<template>
  <div>
        <footer class="clearfix">
        <div :class="tab1_class" >
            <router-link to="/">
                <img :src="tab1" alt="" />
                <p>首页</p>
            </router-link>
        </div>
        <div :class="tab2_class">
            <router-link to="/my/notice">
                <img :src="tab2" alt="" />
                <p>消息</p>
            </router-link>
        </div>
        <div :class="tab3_class">
            <router-link to="/bid/pushbid">
                <img src="@/assets/img/foot3.png" alt="" />
                <p>发标</p>
            </router-link>
        </div>
        <div :class="tab4_class">
            <router-link to="/my/bidlist" >
                <img :src="tab4" alt="" />
                <p>订单</p>
            </router-link>
        </div>
        <div :class="tab5_class">
            <router-link to="/my/my" >
                <img :src="tab5" alt="" />
                <p>我的</p>
            </router-link>
        </div>
    </footer>
  </div>
</template>

<script>
import tab1_no from '@/assets/img/foot1.png'
import tab1 from '@/assets/img/foot1_sel.png'
import tab2_no from '@/assets/img/foot2.png'
import tab2 from '@/assets/img/foot2_sel.png'
import tab4_no from '@/assets/img/foot4.png'
import tab4 from '@/assets/img/foot4_sel.png'
import tab5_no from '@/assets/img/foot5.png'
import tab5 from '@/assets/img/foot5_sel.png'

export default {
  // name: 'bartab',
  data () {
    return {
      //图片
      tab1:tab1_no,
      tab2:tab2_no,
      tab4:tab4_no,
      tab5:tab5_no,
      //class item act
      tab1_class:'item',
      tab2_class:'item',
      tab3_class:'item',
      tab4_class:'item',
      tab5_class:'item',

    }
  },
  methods: {
    
   
  },
  computed:{
      
  },
  created(){
    switch(this.$route.path){
      case '/':
      this.tab1=tab1;
      this.tab1_class='item act';
      break;
      case '/my/notice':
      this.tab2=tab2;
      this.tab2_class='item act';
      break;
      case '/bid/pushbid':
      this.tab3_class='item act';
      break;
      case '/my/bidlist':
      this.tab4=tab4;
      this.tab4_class='item act';
      break;
      case '/my/my':
      this.tab5=tab5;
      this.tab5_class='item act';
      break;
    }
  }
}
</script>

